/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author PR
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface WhTmIn extends BasicModel<WhTmIn> {
  cinvcode?: string; // 物料编码
  cinvaddcode?: string; // 物料代码
  cinvname?: string; // 物料名称
  cwhcode?: string; // 仓库
  pcno?: string; // 批次
  qty?: number; // 数量
  cposcode?: string; // 货位
}

export const whTmInList = (params?: WhTmIn | any) =>
  defHttp.get<WhTmIn>({ url: adminPath + '/wh/in/whTmIn/list', params });

export const whTmInListData = (params?: WhTmIn | any) =>
  defHttp.post<Page<WhTmIn>>({ url: adminPath + '/wh/in/whTmIn/listData', params });

export const whTmInForm = (params?: WhTmIn | any) =>
  defHttp.get<WhTmIn>({ url: adminPath + '/wh/in/whTmIn/form', params });

export const whTmInSave = (params?: any, data?: WhTmIn | any) =>
  defHttp.postJson<WhTmIn>({ url: adminPath + '/wh/in/whTmIn/save', params, data });

export const whTmInDelete = (params?: WhTmIn | any) =>
  defHttp.get<WhTmIn>({ url: adminPath + '/wh/in/whTmIn/delete', params });
